package com.community.web.master.context;

public class BaseContext {

    public static ThreadLocal<UserWithRole> threadLocal = new ThreadLocal<>();

    public static void setCurrentUser(UserWithRole user) {
        threadLocal.set(user);
    }

    public static UserWithRole getCurrentUser() {
        return threadLocal.get();
    }

    public static void removeCurrentUser() {
        threadLocal.remove();
    }

}
